import React,{useState} from 'react'
import axios from "axios";
import http from "../../../../../services/service";


let initData = http.get('/yxx/rINfo').then(resp=>{
    return resp.data
});


async function reserveReducer(preState = initData,action) {
    const {type, data} = action;
    //根据type值，决定如何处理数据
    switch (type) {
        case 'initData':
            preState = await http.get('/yxx/rINfo').then(resp=>{
                return resp.data
            })
            return preState;
        case 'delete':
            break;
    }
}


export default reserveReducer